30 PRINT TAB(8);"The binomial distribution provides a one-tailed exact test":PRINT "applicable when a dichotomous variable has an equal probability of occurring": PRINT TAB(27);"in each of N trials.": PRINT
40 PRINT TAB(16);:INPUT "Enter the number of trials (integer) : ",NT: PRINT
50 PRINT TAB(11);:INPUT "Enter probability of success on each trial: ",PS
60 IF ABS(PS-0.5)>0.5 THEN BEEP: PRINT TAB(7); "(NOTE: Probability should be fraction between 0 and 1)": GOTO 50
70 PRINT: PRINT TAB(15);:INPUT "Enter the number of successes observed: ",NO
80 COLOR 23: PRINT: PRINT: AP=CSRLIN: PRINT TAB(25);"CALCULATING PROBABILITY"
100 AF=0: CO=NO: IF NO>INT(PS*NT) THEN AF=1: PS=1-PS: CO=NT-NO